WinWait, PSPad, 
IfWinNotActive, PSPad, , WinActivate, PSPad, 
WinWaitActive, PSPad, 
MouseClick, left,  762,  18
Sleep, 100
Send, {CTRLDOWN}{F4}{CTRLUP}
WinWait, PSPad, 
IfWinNotActive, PSPad, , WinActivate, PSPad, 
WinWaitActive, PSPad, 
Send, {F12}
WinWait, Save As..., 
IfWinNotActive, Save As..., , WinActivate, Save As..., 
WinWaitActive, Save As..., 
Send, {END}{BACKSPACE}{BACKSPACE}{BACKSPACE}txt{ENTER}